<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Date</title>
	<style>
		input {
			border: 1px solid rgba(0, 0, 0, 0.8);
			text-align: right;
			font-size: 20px;
			font-weight: bold;

		}
	</style>
</head>
<body>
	minutes:<input type="text" value="0">
	seconds:<input type="text" value="0">

	<script>
		var minutesNode = document.getElementsByTagName('input')[0];
		var secondsNode = document.getElementsByTagName('input')[1];
		var minutes = 0,
			seconds = 0;
			var timer = setInterval (function () {
				seconds ++;
				if (seconds == 60) {
					seconds = 0;
					minutes ++;
				}
				secondsNode.value = seconds;
				minutesNode.value = minutes;
				if (minutes == 3) {
					clearInterval(timer);
				}

			},10);
	</script>
</body>
</html>